/**
 * 
 */
package com.lorizz.picpub.web.controller.impl;

import javax.servlet.http.HttpServletRequest;

import org.springframework.ui.Model;

import com.lorizz.picpub.web.Constants;
import com.lorizz.picpub.web.controller.HomeController;
import com.lorizz.upm.np.UserProfileNP;

/**
 * @author wind hong
 * 
 */
public class HomeControllerImpl implements HomeController {

    @Override
    public Object handle(HttpServletRequest request, Model model) {
        UserProfileNP userProfileNP = (UserProfileNP) request.getSession().getAttribute(Constants.SESSION_USERPROFILE);
        if (userProfileNP == null)
            return "redirect:/signin";
        return "redirect:/i/albums";
    }

}
